//
//  SYlabelAddImageView.m
//  BSHOUYIFANG
//
//  Created by 曹雁彬 on 15/8/19.
//  Copyright (c) 2015年 CYB. All rights reserved.
//

#import "SYlabelAddImageView.h"
#import "Header.h"
@implementation SYlabelAddImageView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        UITapGestureRecognizer *tapView1 = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tap:)];
        UITapGestureRecognizer *tapView2 = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tap:)];
        UITapGestureRecognizer *tapView3 = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tap:)];
        
        _bmgView1 = [[UIImageView alloc]initWithFrame:CGRectMake(10, 0, (SCREEN_WIDTH-30)/3, frame.size.height-35)];
        _bmgView1.backgroundColor = [UIColor whiteColor];
        _bmgView1.tag = 4001;
        _bmgView1.userInteractionEnabled = YES;
        [_bmgView1 addGestureRecognizer:tapView1];
        
        _bmgView2 = [[UIImageView alloc]initWithFrame:CGRectMake((SCREEN_WIDTH-30)/3+15, 0, (SCREEN_WIDTH-30)/3, frame.size.height-35)];
        _bmgView2.backgroundColor = [UIColor whiteColor];
        _bmgView2.tag = 4002;
        _bmgView2.userInteractionEnabled = YES;
        [_bmgView2 addGestureRecognizer:tapView2];
        
        _bmgView3 = [[UIImageView alloc]initWithFrame:CGRectMake((SCREEN_WIDTH-30)/3*2+20, 0, (SCREEN_WIDTH-30)/3, frame.size.height-35)];
        _bmgView3.backgroundColor = [UIColor whiteColor];
        _bmgView3.tag = 4003;
        _bmgView3.userInteractionEnabled = YES;
        [_bmgView3 addGestureRecognizer:tapView3];
        
        _describe1 = [[UILabel alloc]initWithFrame:CGRectMake(10, frame.size.height-35, (SCREEN_WIDTH-30)/3, 25)];
        _describe1.textAlignment = NSTextAlignmentCenter;
       // _describe1.backgroundColor = kMColor(240, 240, 240,1.0);
        
        _describe2 = [[UILabel alloc]initWithFrame:CGRectMake((SCREEN_WIDTH-30)/3+15, frame.size.height-35, (SCREEN_WIDTH-30)/3, 25)];
        _describe2.textAlignment = NSTextAlignmentCenter;
        //_describe2.backgroundColor = kMColor(240, 240, 240,1.0);;
        
        _describe3 = [[UILabel alloc]initWithFrame:CGRectMake((SCREEN_WIDTH-30)/3*2+20, frame.size.height-35, (SCREEN_WIDTH-30)/3, 25)];
        _describe3.textAlignment = NSTextAlignmentCenter;
        //_describe3.backgroundColor = kMColor(240, 240, 240,1.0);
        
        
        [self addSubview:_bmgView1];
        [self addSubview:_bmgView2];
        [self addSubview:_bmgView3];
        [self addSubview:_describe1];
        [self addSubview:_describe2];
        [self addSubview:_describe3];
    }
    return self;
}
- (void)tap:(UITapGestureRecognizer*)tap
{
    //点击完成之后 跳转
    if (_webBlock !=nil) {
        _webBlock(tap.view.tag-4000);
    }
    
}
@end


